import OlProjection from 'ol/proj/Projection';

export type AxisOrientationType = 'neu' | 'enu';

export interface ProjectionOption {
    code: string;
    resolutions: number[];
    units: string;
    extent?: [number, number, number, number];
    axisOrientation: AxisOrientationType;
    global?: boolean;
    worldExtent: [number, number, number, number];
}

export interface ViewOption {
    center: [number, number];
    zoom: number;
    maxZoom?: number;
    minZoom?: number;
    projection?: string | OlProjection;
    extent?: [number, number, number, number];
    resolutions?: number[];
}

export interface ControlOption {
    /**
     * 是否使用 比例尺
     */
    scaleLineControl?: boolean;

    /**
     * 是否使用 放大缩小
     */
    mapZoomControl?: boolean;

    /**
     * 是否使用 放大缩小
     */
    layerChangeControl?: boolean;
}

// export interface MapOption {
//     viewOption: ViewOption;
//     projectionOption: ProjectionOption | string;
//     tk?: string;
//     controlOption: ControlOption;
// }
//
// export const MAP_OPTION_INTERCEPTOR = new InjectionToken<MapOption>('MAP_OPTION_INTERCEPTOR');
